import axios from './base';

export const getPublishedSurveyInfo = ({ surveyPath }) => {
  return axios.get('/responseSchema/getSchema', {
    params: {
      surveyPath,
    },
  });
};

export const submitForm = (data) => {
  return axios.post('/surveyResponse/createResponse', data);
};

export const queryVote = ({ surveyPath, fieldList }) => {
  return axios.get('/counter/queryOptionCountInfo', {
    params: {
      surveyPath,
      fieldList,
    },
  });
};

export const getEncryptInfo = () => {
  return axios.get('/clientEncrypt/getEncryptInfo');
};
